package com.zxy.ziems.server.device.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zxy.ziems.common.pojo.MeasureDataDayBean;
import com.zxy.ziems.server.collection.pojo.entity.CollectionDevicePropertyParam;
import com.zxy.ziems.server.device.pojo.entity.DevicePropertyEntity;
import com.zxy.ziems.server.mybatis.core.mapper.BaseMapperX;
import com.zxy.ziems.server.mybatis.core.pojo.PageParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 设备关联属性
 *
 * @author 10348359
 * @create 2024-03-21 10:04
 */
@Mapper
public interface DevicePropertyMapper extends BaseMapperX<DevicePropertyEntity> {

    /**
     * 根据设备id 查询所有的属性列表 full join 设备类型属性表
     *
     * @param deviceId       设备id
     * @param deviceTypeCode 设备类型Code
     * @return
     */
    List<DevicePropertyEntity> selectListBy(@Param("deviceId") String deviceId,
                                            @Param("deviceTypeCode") String deviceTypeCode);

    IPage<CollectionDevicePropertyParam> selectDeviceProperty(@Param("page") IPage<CollectionDevicePropertyParam> page, @Param("param") PageParam param);

    /**
     * 根据设备编号查询设备信息
     */
    List<MeasureDataDayBean> selectDeviceInfo(@Param("deviceCodeList") List<String> deviceCodeList);

    /**
     * 查询电力系统设备数据
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDlDeviceProperty(@Param("page") IPage<CollectionDevicePropertyParam> page, @Param("param") PageParam param);

    /**
     * 获取实时值采集设备
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceFmcsRealProperty(@Param("page") IPage<CollectionDevicePropertyParam> page, @Param("param") PageParam param);

    /**
     * 获取实时值采集设备
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectFmcsDlDeviceProperty(@Param("page") IPage<CollectionDevicePropertyParam> page, @Param("param") PageParam param);

    /**
     * FMCS PV值
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceFmcsPvProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * Fmcs采集器获取
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceFmcsProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * 水科纯废水包商电力数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceWaterDlProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * 水科纯废水包商化学品数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceWaterChemicalProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * CIM电力数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceCIMDlProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * CIM水数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceCIMWaterProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * CIM气数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceCIMGasProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);


    /**
     * 手工填报天然气数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectManualInputNaturalGasProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * 手工填报化学品数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectManualInputChemicalsProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * 水科 (自来水,CDA,N2,H2)数据采集
     *
     * @param page
     * @param param
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceWaterProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);

    /**
     * 查询水科同步sqlserver库需要采集设备
     *
     * @param page
     * @return
     */
    IPage<CollectionDevicePropertyParam> selectDeviceWaterTotalRealProperty(IPage<CollectionDevicePropertyParam> page, PageParam param);
}
